package com.dd.cloud.user.req.order;

import com.dd.cloud.common.exception.ZekeException;
import com.dd.cloud.common.utils.Assert;
import com.dd.cloud.common.vo.PageDateReq;
import lombok.Data;

/**
 * @author Lx
 * @version 1.0
 */
@Data
public class OrderProfitPageReq extends PageDateReq {
    /**
     * 订单号
     */
    private String keyword;
    /**
     * 结算状态
     */
    private String settlement;
    /**
     * 一级机构id
     */
    private String tapId;
    /**
     * 药房id
     */
    private String pharmacyId;
    /**
     * 是否需要统计数据 0否 1是
     */
    private Integer statistics = 0;

    /**
     * 验证参数
     */
    public void verifyParam() {
        if (verify()) {
            throw new ZekeException(400, "日期参数错误");
        }
        Assert.verifyStatusIdsParam(settlement, "settlement", false);
        Assert.verifyStatusIdsParam(tapId, "tapId", false);
        Assert.verifyStatusIdsParam(pharmacyId, "pharmacyId", false);
    }
}
